class ItemRating < ActiveRecord::Base
  belongs_to :item
  has_many :replies, :class_name => 'ItemRatingReply', :dependent => :destroy
  #has_one :vole, :class_name => 'ItemRatingVole',  :dependent => :destroy
  
  def to_s
    title
  end
  
#  def to_param
#    "#{id}-#{title}"
#  end

  def item_name
    item_title.blank? ? item.name : item_title
  end
end
